package com.itheima.springboottilasmanager;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.itheima.springboottilasmanager.mapper.EmpMapper;
import com.itheima.springboottilasmanager.pojo.domain.Emp;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;

@SpringBootTest
public class MPtest {
    @Autowired
    EmpMapper empMapper;


    @Test
    public void testSelectList() {
//       1.创建Wrapper对象
        QueryWrapper<Emp> queryWrapper = new QueryWrapper<>();
        queryWrapper.like("name", "李").gt("salary", 1000);
    List<Emp> list = empMapper.selectList(queryWrapper);
    list.forEach(System.out::println);
    }

}
